<template>
  <div>
    <LoadingCanvas v-if="isLoading"></LoadingCanvas>
    <router-view></router-view>
  </div>
</template>
<script setup lang="ts">
import { flowerDrops } from '@/utils/tool.ts'
import { onMounted, ref } from 'vue'
import { getIP } from "@/utils/getIP.ts";
import { GetIpAddress } from "@/api/address";
import LoadingCanvas from "@/components/LoadingCanvas/index.vue"

setTimeout(() => {
  isLoading.value = false
}, 1000)
const isLoading: any = ref(true)
onMounted(async () => {
  flowerDrops()
  await GetUserIp()
})
const GetUserIp = async () => {
  const ip = await getIP()
  console.log(ip)
  await GetIpAddress(ip)
}
</script>
<style lang="scss">
/*滚动条样式*/
::-webkit-scrollbar {
  width: 0;
  /*height: 4px;*/
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 5px rgba(209, 209, 209, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 5px rgba(209, 209, 209, 0.2);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.1);
}
</style>
